from PyQt5 import QtWidgets
from template.Ui_AppEntry import Ui_AppEntry
from MainWindow8 import MainWindow8
from MainWindow import MainWindow
import sys

# 打包时需要
import _mssql
import decimal

print(_mssql.__version__)
print(decimal.__version__)


class AppEntry(QtWidgets.QMainWindow, Ui_AppEntry):
    def __init__(self):
        super(AppEntry, self).__init__()
        self.setupUi(self)
        self.btn_data_type_8.clicked.connect(self.open_window_8)
        self.btn_data_type_10.clicked.connect(self.open_window)
        self.window8 = MainWindow8(self)
        self.window10 = MainWindow(self)

    def open_window_8(self):
        self.window8.show()
        self.hide()

    def open_window(self):
        self.window10.show()
        self.hide()


if __name__ == '__main__':
    app = QtWidgets.QApplication(sys.argv)
    window = AppEntry()
    window.show()
    sys.exit(app.exec_())
